// @import "fonts/font-face" at bottom
@import "_variables.less";
@import "_mixins.less";
@import "_normalize.less";

html {
  font-family: @font-family-base;
  background: @color-background;
  color: @color-text;
  line-height: @line-height-base;
  font-variant: normal;
  .font-feature-settings("onum" 1, "pnum" 1, "kern" false, "liga" 1);
  margin: 0;
  padding: 0;
}

body {
  font-size: 1.25rem;
}

a, a:visited {
  text-decoration: none;
  color: @color-link;
  .transition(color 0.1s ease-in-out);
  &:hover, &:focus {
    color: @color-link-hover;
  }
  &:active {
    color: @color-link-active;
  }
}

header, h1, h2, h3, h4, h5 {
  font-family: @font-family-base;
  line-height: 1.05;
  margin: 0;
}

/* Web Fonts */

.wf-loading {
  visibility: hidden;
}

.wf-active,
.wf-inactive {
  visibility: visible;
}

/* Typogr.js */

.sc {
  font-family: "source-sans-pro-sc", @font-family-base;
  text-transform: lowercase;
  .font-feature-settings("smcp" 1, "c2sc" 1, "cpsp" 1);
}

/* Container
   For the main content and
   the header.
*/

.container {
  max-width: 36em;
  margin: 0 auto 4em auto;
  padding: 0 1.6em;
  transition: max-width 0.5s;
  img {
    width: 100%;
  }
  @media (min-width: @screen-medium) {
    max-width: 45em;
  }
  ol,ul{
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

.container--articles {
  margin-top: 2em;
  @media (min-width: @screen-medium) {
    padding-left: 10rem;
  }
}

/* Post List Header */

.post-list-header {
  margin-bottom: 3em;
  .avarta{
    height: 170px;
    &>span{
      display: block;
      position: absolute;
      left: 50%;
      margin-left: -80px;
      width: 160px;
      height: 160px;
      border-radius: 80px;
      overflow: hidden;
    }
  }
}

.post-list-header-title {
  font-weight: 400;
  strong {
    font-weight: 900;
  }
}

/* Post List */

.post-list,
.post-item,
.post-meta-list {
  list-style: none;
}

.post-list {
  margin-bottom: 3em;
}

.post-item {
  margin-bottom: 3em;
  .clearfix();
}

.post-item-title {
  font-size: 3rem;
}

.post-item-title {
  display: block;
}

.post-meta-item {
  display: inline-block;
  margin-left: 0.75em;
  &:first-child {
    margin-left: 0;
  }
}

.post-meta-date {
  display: block;
  color: @color-text-lighter;
  @media (min-width: @screen-medium) {
    width: 10rem;
    margin-left: -10rem;
    padding-right: 1em;
    margin-top: 0.15em;
    float: left;
    text-align: right;    
  }
}

/* Unpublished Posts */

.post-item-unpublished, .post-unpublished {
  .post-item-title, .opening-title {
    &:after {
      content: "unpublished";
      font-style: italic;
      font-weight: normal;
      font-size: 0.33em;
      margin-left: 0.5em;
      vertical-align: super;
    }
  }
}

/* Post Previous and Next links */

.post-nav {
  list-style-type: none;
  display: block;
  width: 100%;
}

.post-prev {
  display: inline-block;
  float: left;
  &:before {
    content: "\2190";
    padding-right: 0.5em;
  } 
}

.post-next {
  display: inline-block;
  float: right;

  &:after {
    content: "\2192";
    padding-left: 0.5em;
  }
}

/* Post Opening */

.opening {
  width: 100%;
  overflow: hidden;
  z-index: -1;
  margin: 0;
  padding: 0;
  max-height: 27rem;
  min-height: 5em;
  .opening-header {
    max-height: 27rem;
  }
  .container {
    margin-top: 2em;
  }
  & + .container {
    > p:first-of-type {
      font-size: 1.5rem;
      line-height: @line-height-base;
    }
  }
}

.opening-image {
  width: 100%;
  margin: 0;
  padding: 0;
  opacity: 0.75;
  position: relative;
  display: block;
  @media (min-width: @screen-large) {
    .translateY(-25%);
  }
  & + .opening-header {
    top: 0;
    width: 100%;
    position: absolute;
    color: @color-header;
    text-shadow: 0 0 1rem rgba(0, 0, 0, 0.8);
    .opening-title {
      text-shadow: 0 0 2rem rgba(0, 0, 0, 0.4);  
      text-transform: uppercase;
      line-height: 0.9;
    }
  }

}

.opening-title {
  margin-top: 0.5em;
  line-height: 1;
  font-weight: 800;
  font-size: 2.5rem;
  @media (min-width: @screen-medium) {
    font-size: 3rem;
  }
  @media (min-width: 29em) {
    font-size: 3.25rem;
  }
  @media (min-width: 35em) {
    font-size: 4.5rem;
  }
  @media (min-width: 39em) {
    font-size: 5.25rem;
  }
  @media (min-width: @screen-medium) {
    margin-top: 0.25em;
    // font-size: 6.25rem;
  }
}

.opening-title--long {
  font-size: 2rem;
  text-transform: none;
  @media (min-width: 30rem) {
    font-size: 2.5rem;
  }
  @media (min-width: @screen-medium) {
    font-size: 3rem;
  }
  @media (min-width: @screen-large) {
    font-size: 4rem;
  }
}

.opening-time {
  display: inline-block;
  margin-top: 2em;
  margin-left: 0.25em;
}
.opening .back{
  color: @color-header;
  margin: 0 10px;
  &:hover{
    color:darken(@color-header,10%);
  }
}

.opening-return {
  display: none;
  position: absolute;
}

/* Blockquotes
   Corresponding Markdown is:

   > This is the blockquote
   > **Author [Source](http://example.com/article.html)**

*/

blockquote {
  font-family: @font-family-alternate;
  font-style: italic;
  color: @color-text-light;
  font-weight: 400;
  margin-left: 0;
  margin-right: 0;
  &:before {
    color: lighten(@color-text, 40%);
    content: open-quote;
    display: block;
    font-size: 8em;
    line-height: 1;
    position: relative;
    text-align: right;
    float: left;
    margin-top: -0.1em;
    margin-left: -0.5em;
  }
  p:last-child {
    strong:only-child {
      font-style: normal;
      font-weight: 600;
      font-family: @font-family-base;
      display: block;
      &:before {
        content: "\2014";
      }
      a {
        display: block;
        color: lighten(@color-link, 20%);
        margin-left: 1rem; // One rem should equal the width of the em dash
        font-weight: 400;
      }
    }
  }
}

/* Pullquotes
   Still working on a more Markdown-friendly solution
   Right now, use inline HTML as per:
   http://miekd.com/articles/pull-quotes-with-html5-and-css/
*/

@media (min-width: @screen-medium) {
  .pullquote:before {
    content: attr(data-pullquote);
    overflow: hidden;
    display: block;
    float: left;
    width: 40%;
    font-size: 1.66rem;
    margin-right: 0.5em;
    margin-bottom: 0.25em;
    color: @color-text-light;
    @media (min-width: 42em) {
      margin-left: -1.5em;
      margin-right: 1em;
    }
    @media (min-width: @screen-large) {
      margin-left: -3em;
      width: 50%;
    }
    font-family: @font-family-alternate;
  }
}

/* Code & Pre-formatted Content
   Still working on a way to do syntax highlighting
   on the web server side.

   Harp supports GitHub Flavoured Markdown, which
   will add a class to the code block if you specify
   a language:

   ```jade
   ul
     li Item 1
     li Item 2
   ```
*/

pre {
  background: #2d2d2d;
  padding: 0.5em;
  border-radius: 0.125em;
  overflow-x: scroll;
  code {
    color: darken(@color-background, 10%);
  }
}

code {
  font-size: 90%;
  font-family: @font-family-monospace;
  color: @color-text-light;
}

/* Comments */

.comments {
  padding-top: 4em;
  padding-bottom: 4em;
  margin-top: 8em;
  background: @color-gray;
}

/* Footer */

.return {
  margin-top: 2em;
  display: inline-block;
  padding: 1em;
  margin-left: -1em;
}

.footer {
  &:extend(.container);
  &:extend(.container--articles);
  font-size: 0.8em;
  margin-bottom: 0;
  margin-top: 4em;
  color: @color-text-lighter;
  a, &:visited {
    color: @color-text-light;
    &:hover, &:active, &:focus {
      color: @color-text;
    }
  }
}